<template>
	<view>
		<view class="container" v-for="(item,index) in list" :key="item.id">
			<!-- <view class="d-title">强化内部综合管理</view>
			<view class="d-title">保安员（消控员）管理工作（30分）</view> -->
			<view class="d-title">{{item['事项名称']}}({{item['事项分值'] + '分'}})</view>
			<view class="d-table">
				<!-- <view class="d-tr">
					<view class="d-th">强化内部综合管理</view>
					<view class="d-th">李四</view>
					<view class="d-th">王五</view>
				</view> -->
				<view class="d-tr" v-for="(subItem,subIndex) in list[index]['考核细则']">
					<view class="d-td" style="width: 10%;">
						{{subIndex+1}}
					</view>
					<view class="d-td" style="width: 20%;">
						<view class="d-table">
							<view class="d-tr">
								<view class="d-td border-bottom">考核要求</view>
							</view>
							<view class="d-tr">
								<view class="d-td border-bottom">考核标准</view>
							</view>
							<view class="d-tr">
								<view class="d-td border-bottom">扣分上限</view>
							</view>
						</view>
					</view>
					<view class="d-td">
						<view class="d-table">
							<view class="d-tr">
								<view class="d-td border-bottom">{{subItem['考核要求']}}</view>
							</view>
							<view class="d-tr">
								<view class="d-td border-bottom">{{subItem['考核标准']}}</view>
							</view>
							<view class="d-tr">
								<view class="d-td border-bottom">{{subItem['分数上限']}}</view>
							</view>
						</view>
					</view>
					<view class="d-td" style="width: 15%;">
						<input type="text">
					</view>
				</view>
				<!-- <view class="d-tr">
					<view class="d-td">张三</view>
					<view class="d-td">李四</view>
					<view class="d-td">王五</view>
				</view> -->
			</view>
		</view>
	</view>
	
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default:() => []
			}
		},
		watch: {
			list(newVal) {
				for(let i = 0; i < newVal.length; i++) {
					this.EvaluateInfo.push({
						事项id: null,
						得分: null
					})
				}
			}
		},
		data() {
			return {
				EvaluateInfo: []
			};
		},
		methods: {
			submit() {
				this.$http2.post('transactionCompete/evaluate',{
					项目id: 183,
					考核id: 9,
					考核事项: [{
						事项id: 19,
						内容id: 11,
						得分: 10
					},{
						事项id: 19,
						内容id: 13,
						得分: 10
					}]
				}).then(res => {
					console.log(res)
					if(res.code === 10000) {
						
					}
				})
				this.$emit('submit')
				console.log('提交')
			}
		}
	}
</script>

<style lang="scss">
	.container{
		padding: 10rpx;
	}
	.d-title {
		height: 120rpx;
		border-top: 4rpx solid #efefef;
		text-align: center;
		line-height: 120rpx;
		background-color: #f5f5f5;
	}
</style>
